<h1><%= gettext("Show Category") %></h1>

<%= if @live_action in [:edit] do %>
  <%= live_modal @socket, GlimeshWeb.Admin.CategoryLive.FormComponent,
    id: @category.id,
    title: @page_title,
    action: @live_action,
    category: @category,
    return_to: Routes.category_show_path(@socket, :show, @category) %>
<% end %>

<ul>

  <li>
    <strong><%= gettext("Name") %>:</strong>
    <%= @category.name %>
  </li>

  <li>
    <strong><%= gettext("Slug") %>:</strong>
    <%= @category.slug %>
  </li>

  <li>
    <strong><%= gettext("Avatar") %>:</strong>
    <%= @category.avatar %>
  </li>

  <li>
    <strong><%= gettext("Parent") %>:</strong>
    <%= @category.parent_id %>
  </li>

</ul>

<span><%= live_patch gettext("Edit"), to: Routes.category_show_path(@socket, :edit, @category), class: "button" %></span>
<span><%= live_redirect gettext("Back"), to: Routes.category_index_path(@socket, :index) %></span>
